<template>
  <div id="app">
    <NavBar ref="NavBar" v-on:showpage="showPage" />
    <router-view></router-view>
    <FootData />
  </div>
</template>

<script>
import NavBar from './views/NavBar.vue'
import FootData from './views/FootData.vue'
export default {
  name: 'App',
  components: {
    NavBar,
    FootData
  },
  mounted() {
    if(!this._isMobile()){
      window.location.href="https://dev-www-1300222288.file.myqcloud.com/weiboweb/pcH5/index.html" ;
    }
  },
  methods: {
    _isMobile() {
      let flag = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)
      return flag;
    }
  }
}
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #2c3e50;
}

body,
html,
ul,
li,
p {
  padding: 0;
  margin: 0;
}
</style>
